#ifndef MLFRAME_H
#define MLFRAME_H

#include "Drawer.h"

typedef unsigned char Byte;

class MLFrame {
public:
	MLFrame() {};
	MLFrame(int frame_size_x, int frame_size_y);
	MLFrame copy() const;
	void clear() const;
	uint8_t* getFrame(FrameWriter writer) const;
	void mix(const MLFrame& other_frame, const GLuint shaderProgram);
	void mix(GLuint otherFbo, GLuint otherTexture, GLuint otherRbo, const GLuint shaderProgram);
	void mix_alpha(const MLFrame& other_frame, double self_alpha, double other_alpha, const GLuint shaderProgram);
	void mix_alpha(GLuint otherTexture, double self_alpha, double other_alpha, const GLuint shaderProgram);

	GLuint fbo = 0;
	GLuint rbo = 0;
	GLuint texture = 0;

private:
	int _frame_size_x, _frame_size_y;
};
#endif
